﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ProdeBackEnd.Model;
using ProdeBackEnd.DAO;

namespace ProdeBackEnd.Controller
{
    public class UserController
    {
        private static UserController instance;

        private UserController() { }

        public static UserController getUserControllerInstance()
        {
            if (instance == null)
            {
                instance = new UserController();
            }
            return instance;
        }

        public User createUser(User user)
        {
            User newUser;
            UserService userService = UserService.getUserServiceInstance();
            newUser = userService.save(user);
            return newUser;
        }
    }
}